<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class AppNotice extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_notice', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('id')->nullable(false)->comment('');
			$table->char('appid', 32)->nullable(false)->default(0)->comment('个推标识');
			$table->string('clientid', 50)->nullable(false)->default(0)->comment('设备标识');
			$table->unsignedInteger('Co_ID')->nullable(false)->default(0)->comment('公司编号');
			$table->unsignedInteger('user_id')->nullable()->default(0)->comment('用户编号');
			$table->datetime('update_at')->nullable()->default(null)->comment('');
			
        });

       // DB::statement("alter table `app_notice` comment 'app通知注册表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('app_notice');
    }
}
